﻿using DAL.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BaseBLL = BLL;
namespace ojvarORM
{
	public partial class Form1 : Form
	{
		public Form1 ()
		{
			InitializeComponent ();
		}

		private void Form1_Load (object sender, EventArgs e)
		{
		}

		/// <summary>
		///  My Logic
		/// </summary>
		BLL.Logic.tests	t	= new BLL.Logic.tests ();

		/// <summary>
		/// Create Record
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void button1_Click (object sender, EventArgs e)
		{
			BLL.Entity.test	d	= new BLL.Entity.test ();

			BaseBLL.General.FormModelHelper<BLL.Entity.test>.fillModel (this, d);
			t.create (d);
		}

		/// <summary>
		/// Read Record
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void button2_Click (object sender, EventArgs e)
		{
			BLL.Entity.test	d	= new BLL.Entity.test ();

			d.id	= 4;
			CommandResult	res	= t.read (d);
		}
	}
}
